package Code;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Scanner;

public class QuestionNum_23_1_hxj {
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入源文件路径:");
        String srcPath = sc.nextLine();
        System.out.println("请输入目的文件路径:");
        String destPath = sc.nextLine();
        BufferedWriter bw = new BufferedWriter(new FileWriter(destPath));
        BufferedReader br = new BufferedReader(new FileReader(srcPath));

        char[] buf = new char[1024];
        String len = null;
        while ((len = br.readLine()) != null){
            bw.write(len);
            bw.flush();
        }
        bw.close();
        br.close();
    }
}
